package com.funo.wcity.app.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.funo.wcity.app.dao.TblCompaniesDAO;
import com.funo.wcity.app.entity.TblCompanies;
import com.funo.wcity.app.service.TblCompaniesService;

@Service("tblCompaniesService")
public class TblCompaniesServiceImpl implements TblCompaniesService {
	@Resource(name="tblCompaniesDAO")
	private TblCompaniesDAO tblCompaniesDAO;
	
	public List getTblCompaniesList(String IdEmployees,Integer idCompanyType) {
		return this.tblCompaniesDAO.getTblCompaniesList(IdEmployees,idCompanyType);
	}

	public List getTblCompaniesList(String IdEmployees) {
		return this.tblCompaniesDAO.getTblCompaniesList(IdEmployees);
	}
	
	public void createTblCompanies(TblCompanies company){
		this.tblCompaniesDAO.save(company);
	}
	
	public TblCompanies getTblCompaniesById(Integer idCompany){
		return this.tblCompaniesDAO.get(idCompany);
	}
	
	public void updateTblCompanies(TblCompanies company){
		this.tblCompaniesDAO.update(company);
	}

	public void deleteTblCompaniesById(TblCompanies company) {
		this.tblCompaniesDAO.delete(company);
	}
	
	public TblCompanies getTblCompaniesByIdContactPerson(Integer idContactPerson) {
		return this.tblCompaniesDAO.getTblCompaniesByIdContactPerson(idContactPerson);
	}
}
